wayland: Destroy the xdg_imported after the wl_surface
authorJonas Ådahl <jadahl@gmail.com>
Fri, 1 Dec 2017 08:03:34 +0000 (16:03 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 8 Dec 2017 03:13:30 +0000 (22:13 -0500)
This way the window manager can handle destruction while having the
transient-for relationship still valid.

https://bugzilla.gnome.org/show_bug.cgi?id=791062

gdk/wayland/gdkwindow-wayland.c

index 214bda4cc592f0990bb5e32ce19ea44b525bda08..ebfe9ab113d723f1f8376207c1c3ebb3d4f0d552 100644 (file)
@@ -2448,8 +2448,6 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
   GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
   GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
 
-  unset_transient_for_exported (window);
-
   unmap_popups_for_window (window);
 
   if (impl->display_server.wl_surface)
@@ -2531,6 +2529,8 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
           g_list_remove (display_wayland->orphan_dialogs, window);
     }
 
+  unset_transient_for_exported (window);
+
   _gdk_wayland_window_clear_saved_size (window);
   impl->pending_commit = FALSE;
   impl->mapped = FALSE;